﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace bonus.Models
{
	/// <summary>
	/// 月结表
	/// </summary>
	public class Monthl
	{
		/// <summary>
		/// ID
		/// </summary>
		public ObjectId _id { get; set; }

		/// <summary>
		/// 数据时间
		/// </summary>
		public string DataDT { get; set; }

		/// <summary>
		/// 数据时间
		/// </summary>
		public string DataStr { get; set; }

		/// <summary>
		/// 金额
		/// </summary>
		public decimal Money { get; set; }

		/// <summary>
		/// 类型
		/// </summary>
		public int Type { get; set; }

		#region 类型

		/// <summary>
		/// 月结类型
		/// </summary>
		public class TypeClass
		{
			/// <summary>
			/// 报单
			/// </summary>
			public static readonly int ORDER = 5;

			public static string GetType(int Status)
			{
				string StatusDesc = string.Empty;
				switch (Status)
				{
					case 5:
						StatusDesc = "报单";
						break;
					default:
						StatusDesc = "异常";
						break;
				}
				return StatusDesc;
			}

		}

		#endregion

		/// <summary>
		/// 添加时间
		/// </summary>
		public string AddDT { get; set; }

	}
}